package com.io.example.demoparent.tree;



public class BinaryTreeDemo {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();

        HeroNode root = new HeroNode(1,"松江");
        HeroNode heroNode1 = new HeroNode(2,"吴用");
        HeroNode heroNode2 = new HeroNode(3,"卢俊义");
        HeroNode heroNode3 = new HeroNode(4,"林冲");
        root.setLeft(heroNode1);
        root.setRight(heroNode2);
        heroNode2.setRight(heroNode3);
        binaryTree.setRoot(root);
        root.preOrder();
    }
}

